import { lazy,Suspense } from 'react'
import { Navigate } from 'react-router-dom'
import Loading from "../component/Loading/Loading"
var SystemTag = lazy(() => import('../view/Index/CXY/SystemTag'))
var SystemRole = lazy(() => import('../view/Index/CXY/SystemRole'))
var SystemConsut = lazy(() => import('../view/Index/CXY/SystemConsut'))
var SystemConsutEdit = lazy(() => import('../view/Index/CXY/SystemConsutEdit'))
var SystemDrug = lazy(() => import('../view/Index/CXY/SystemDrug'))
var SystemDrugEdit = lazy(() => import('../view/Index/CXY/SystemDrugEdit'))
var SystemSwiper = lazy(() => import('../view/Index/CXY/SystemSwiper'))
var SystemSwiperEdit = lazy(() => import('../view/Index/CXY/SystemSwiperEdit'))
var SystemNotice = lazy(() => import('../view/Index/CXY/SystemNotice'))
var SystemEditNotice = lazy(() => import('../view/Index/CXY/SystemEditNotice'))

var SystemAgreement = lazy(() => import('../view/Index/CXY/SystemAgreement'))
var SystemHandle = lazy(() => import('../view/Index/CXY/SystemHandle'))

var NotFound = lazy(() => import('../view/NotFound/NotFound'))
let System: any = [
    // 资料管理-zheng
    { path: '/index/system-tag', element: <Suspense fallback={<Loading/>}><SystemTag /></Suspense> },
    { path: '/index/system-role', element: <Suspense fallback={<Loading/>}><SystemRole /></Suspense> },
    { path: '/index/system-consult', element: <Suspense fallback={<Loading/>}><SystemConsut /></Suspense> },
    { path: '/index/system-editconsult', element: <Suspense fallback={<Loading/>}><SystemConsutEdit /> </Suspense>},
    { path: '/index/system-drug', element: <Suspense fallback={<Loading/>}><SystemDrug /></Suspense> },
    { path: '/index/system-editdrug', element: <Suspense fallback={<Loading/>}><SystemDrugEdit /></Suspense> },
    { path: '/index/system-swiper', element: <Suspense fallback={<Loading/>}><SystemSwiper /></Suspense> },
    { path: '/index/system-editswiper', element: <Suspense fallback={<Loading/>}><SystemSwiperEdit /></Suspense> },
    { path: '/index/system-notice', element: <Suspense fallback={<Loading/>}><SystemNotice /></Suspense> },
    { path: '/index/system-editnotice', element: <Suspense fallback={<Loading/>}><SystemEditNotice /></Suspense> },
    { path: '/index/system-agreement', element: <Suspense fallback={<Loading/>}><SystemAgreement /></Suspense> },
    { path: '/index/system-handle', element: <Suspense fallback={<Loading/>}><SystemHandle /></Suspense> },

    { path: '*', element: <Suspense fallback={<Loading/>}><NotFound /></Suspense> },
]
export default System